package com.esisa.web.actions;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.lang.Long;
import com.opensymphony.xwork2.ActionSupport;

public class AjaxActions extends ActionSupport{
	 
    private String name;
    private String greeting;
    private List<String> countryList;
    private Map<String,Long> countryMap;
 
    public String sayHi(){
         
    	System.out.println(">>> Say Hi");
        greeting="HI " +name;
 
        countryList=new ArrayList();
        countryList.add("US");
        countryList.add("UK");
        countryList.add("Russia");
 
        countryMap= new HashMap();
        countryMap.put("US",1L);
        countryMap.put("UK",2L);
        countryMap.put("Russia",3L);
 
        return ActionSupport.SUCCESS;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String getGreeting() {
        return greeting;
    }
 
    public void setGreeting(String greeting) {
        this.greeting = greeting;
    }
 
    public List<String> getCountryList() {
        return countryList;
    }
 
    public void setCountryList(List<String> countryList) {
        this.countryList = countryList;
    }
 
    public Map<String,Long> getCountryMap() {
        return countryMap;
    }
 
}